Repeat digital message transmission between a microprocessor monitoring circuit and an analyzing tool

ABSTRACT

The invention concerns a method for transmitting digital messages through output terminals ( 22 ) of a monitoring circuit ( 18 ) incorporated in a microprocessor ( 12 ) during execution of a series of instructions, the digital messages representing characteristic data stored by the monitoring circuit upon detecting a specific event in the execution of the series of instructions, one of said data corresponding to an identifier of said specific event, said method comprising the following steps: comparing the data of the last two detected specific events having a common identifier, if the compared data are identical, incrementing a repeat counter associated with said specific event; and if the compared data are different, transmitting a digital message representing the data of the last detected specific event, and furthermore, if the content of the repeat counter associated with said specific event is other than zero, transmitting a digital message indicating a repeat of the specific event.

The present invention relates to the testing of microprocessors. It more specifically relates to a method and device of digital data transmission between a monitoring circuit integrated in a microprocessor chip and an analysis tool.

FIG. 1 schematically shows an integrated circuit 10 comprising a microprocessor (μP) 12, an internal memory (MEM) 14, and input/output terminals (I/O) 16. Microprocessor 12 is intended to execute a program or a software stored in memory 14. Under control of the program, microprocessor 12 may process data provided by input/output terminals 16 or stored in memory 14 and read or write data through input/output terminals 16.

To check the proper operation of the microprocessor, a monitoring circuit 18 is generally integrated to integrated circuit 10. Monitoring circuit 18 is capable of reading specific data provided by microprocessor 12 on execution of a program, and of possibly processing the read data. Test terminals 22 connect monitoring circuit 18 to an analysis tool 24. Analysis tool 24 may process the received signals, for example, according to commands provided by a user, and ensure a detailed analysis of the operation of microprocessor 12. In particular, analysis tool 24 may determine the program instruction sequence really executed by microprocessor 12.

The number of test terminals 22 may be on the same order of magnitude as the number of input/output terminals 16, for example, from 200 to 400 terminals. Test terminals 22 as well as the connections of monitoring circuit 18 take up a significant silicon surface area, which causes an unwanted increase in the circuit cost. For this purpose, a first version of integrated circuit 10 comprising monitoring circuit 18 and test terminals 22 is produced in small quantities to debug the program of microprocessor 12 or “user program”. After this debugging, a version of integrated circuit 10 rid of monitoring circuit 18 and of test terminals 22 is sold. This implies the forming of two versions of the integrated circuit, which requires a significant amount of work and is relatively expensive. Further, the final chip is not necessarily identical to the tested chip.

To overcome the above-mentioned disadvantages, it is desired to form a monitoring circuit 18 which takes up a reduced surface area and only requires a reduced number of test terminals 22, which decreases the cost of the monitoring circuit. Monitoring circuit 18 can then be left on the finally sold integrated circuit 10.

It is thus desired to decrease the number of signals provided by monitoring circuit 18. For this purpose, certain logic operations are directly performed at the level of monitoring circuit 18 on the data measured at the level of microprocessor 12 to only transmit messages having an important information content.

Thus, standard IEEE-ISTO-5001 in preparation provides in its 1999 version, accessible, for example, on website www.ieee-isto.org/Nexus5001, a specific message exchange protocol between a monitoring circuit and an analysis tool for a monitoring circuit 18 requiring but a reduced number of test terminals 22.

Among the messages provided by monitoring circuit 18 according to standard IEEE-ISTO-5001, a message indicates the occurrence of a jump in the program executed by microprocessor 12. A jump corresponds to the passing from an initial instruction of the program to a destination instruction other than the instruction which follows the initial instruction in the sequence of instructions forming the program. Based on the jump messages transmitted by monitoring circuit 18, analysis tool 24 reconstitutes the sequence of instructions executed by microprocessor 12. The sequence of reconstituted instructions can then be compared with a sequence of instructions theoretically executed by microprocessor 12 to determine malfunctions of microprocessor 12.

Standard IEEE-ISTO-5001 defines a jump message formed of a header identifying the type of jump from among different types of jumps detectable by the monitoring circuit and of an integer indicating the number of instructions executed by the microprocessor since the last transmission of a jump message and, if necessary of data representative of the destination instruction address.

A program executed by a microprocessor generally comprises loops, a loop corresponding to the repetition, a number of times, of a sequence of instructions, a jump being performed from the last instruction of the loop to the first instruction of the loop. In specific applications, especially in telephony, the program may comprise a significant number of loops of small size. As an example, the copying of the content of a memory may be performed by a loop containing a single instruction and that can be implemented, according to the used technologies, by one or two operation clock cycles of the microprocessor.

Current microprocessors currently operate at clock frequencies reaching 400 MHz. However, according to the technologies used, the maximum frequency of transmission of messages by monitoring circuit 18 on test terminals 22 is generally limited to some hundred megahertz. On execution of a loop of small size, the frequency at which messages representative of the loop jumps should be transmitted by monitoring circuit 18 on test terminals 22 may exceed the maximum transmission frequency. This results in a saturation of the monitoring circuit which can no longer provide messages properly.

Further, according to standard IEEE-ISTO-5001, monitoring circuit 18 can provide a message each time microprocessor 12 executes an instruction for reading data stored in memory 14 or an instruction for writing data into memory 14. Accordingly, when a loop of small size comprises a read or write instruction, monitoring circuit 18 must transmit on test terminals 22, in addition to the messages representative of the loop jumps, messages representative of the read or write operations, which can increase the risks of saturation of monitoring circuit 18.

The present invention aims at a method and a circuit for transmitting digital messages, through output terminals of a monitoring circuit integrated to a microprocessor, indicating the occurrence of specific events on execution of the program by the microprocessor, and which does not exhibit the previously-mentioned disadvantage.

To achieve this object, the present invention provides a method for transmitting digital messages through output terminals of a monitoring circuit integrated to a microprocessor on execution of an instruction sequence by the microprocessor, each digital message being representative of characteristic data memorized by the monitoring circuit on detection of a specific event from among several specific events in the execution of the instruction sequence, one of said data corresponding to an identifier of said specific event, comprising the steps of comparing the characteristic memorized data of the last two detected specific events corresponding to a same identifier; if the compared data are identical, incrementing a repetition counter associated with said specific event; and if the compared data are different, transmitting a digital message representative of the data characteristic of the last detected specific event and, further, if the content of the repetition counter associated with said specific event is different from zero, transmitting a digital message indicating a repetition of the specific event.

According to an embodiment of the present invention, the digital message indicating a repetition of the specific event comprises the content of the repetition counter associated with said specific event.

According to an embodiment of the present invention, the method further comprises the step of resetting the repetition counter associated with said specific event after transmission of a digital message indicating a repetition of the specific event.

According to an embodiment of the present invention, the characteristic data comprise the number of instructions executed by the microprocessor between the last two detected specific events.

According to an embodiment of the present invention, the specific event is a jump in the instruction sequence executed by the microprocessor.

According to an embodiment of the present invention, the characteristic memorized data comprise data representative of the address of the destination instruction of the last detected jump.

According to an embodiment of the present invention, the specific event is a read or write instruction in the instruction sequence executed by the microprocessor.

According to an embodiment of the present invention, the method further comprises the steps of transmitting a digital message indicating a repetition of the specific event if the content of the repetition counter associated with said specific event is greater than a determined threshold; and setting the repetition counter associated with said specific event to zero.

The present invention also provides a device for transmitting digital messages between a monitoring circuit integrated to a microprocessor and an analysis tool, on execution of an instruction sequence by the microprocessor, comprising a means for detecting a specific event from among several specific events in the execution of the instruction sequence; a means for memorizing data characteristic of the detected specific event, one of said characteristic data corresponding to an identifier of the specific event; and a means for transmitting a digital message representative of the memorized characteristic data, comprising a means for comparing memorized characteristic data of the last two detected specific events corresponding to a same identifier; a means for incrementing a repetition counter associated with said specific event when the comparison means provides a signal indicating that the compared data are identical, the transmission means being capable of transmitting a message representative of the data characteristic of the last detected specific event when the comparison means provides a signal indicating that the compared data are different and, further, of transmitting a digital message indicating a repetition of the specific event when the incrementation means provides a signal indicating that the content of the repetition counter associated with said specific event is different from zero.

According to an embodiment of the present invention, the incrementation means is further capable of setting the repetition counter associated with said specific event to zero when the transmission means transmits a digital message indicating a repetition of the specific event.

The foregoing object, features, and advantages of the present invention, as well as others, will be discussed in detail in the following non-limiting description of specific embodiments in connection with the accompanying drawings, among which:

FIG. 1, previously described, very schematically shows the architecture of a chip integrating a microprocessor and a monitoring device; and

FIG. 2 shows in the form of a block diagram an example of implementation of the method of digital message transmission by the monitoring circuit according to the present invention.

The present invention relates to the transmission of digital messages between a monitoring circuit integrated to the chip of a microprocessor and an analysis tool, for example, according to an architecture similar to that of FIG. 1. Monitoring circuit 18 is capable of transmitting to analysis tool 24 different messages when specific events occur on execution of a program by microprocessor 12. The coding of the digital message may correspond to the coding described in standard IEEE-ISTO-5001. For example, monitoring circuit 18 transmits to analysis tool 24 a message indicating the detection of a jump in the execution of the program by microprocessor 12. A jump can be imposed by a specific instruction of the program or be caused by elements of the circuit of microprocessor 12. A repetition of a same instruction sequence of the program a number of times is for example obtained by a jump imposed by circuit elements of microprocessor 12. A jump may for example be systematically caused when microprocessor 12 receives an alert signal indicating a low charge level of the supply battery of circuit 10. Monitoring circuit 18 also transmits to the tool a message indicating the detection of a read or write operation on execution of the program by microprocessor 12. To determine the number of repetitions of a same message which should be provided by monitoring circuit 18 several times in a row, monitoring circuit 18 comprises a repetition counter initially set to 0 and associated with a specific message.

FIG. 2 describes in the form of a block diagram an example of implementation of the method of digital message transmission between monitoring circuit 18 and analysis tool 24.

The digital message transmission method consists, when the same message should be transmitted by monitoring circuit 18 several times in a row on execution of the program by microprocessor 12, of transmitting the message only once, and of transmitting a message indicating the number of repetitions of the message.

At step 30, monitoring circuit 18 has detected a specific event on execution of the program stored in memory 14 by microprocessor 12 which normally leads to the transmission of a message by monitoring circuit 18 to analysis tool 24. Monitoring circuit 18 then memorizes specific data characteristic of the detected event. In particular, in the case where the detected event is a jump, memorized data correspond to an identifier of the detected jump type. Other memorized data correspond to the number of instructions executed by microprocessor 12 between the detected jump and the previously-detected jump. Other memorized data may correspond to the destination address of the jump. The memorization of such data may be necessary to analysis tool 24, when the jump results from a jump instruction which controls a jump to a program instruction located at an address defined by a variable that can take different values. In the case where the detected event is a read or write operation, memorized data correspond to an identifier indicating whether it is a read or write operation. Other memorized data correspond to the value of the memorized or read data. Other memorized data may be representative of the address of an area of memory 14 where the data are stored or read. The method then carries on to step 31.

At step 31, monitoring circuit 18 compares the memorized data characteristic of the event detected at step 30 with the memorized data associated with the last detected event corresponding to the same identifier. The comparison is performed for data of same nature. As an example, when the event is a jump, the comparison is performed for example both on the number of instructions performed since the previously-detected jump, the destination address if available, etc. When the event is a read operation, the comparison is performed for example both on the value of the read data and the address of the memory area from which the data are read. If the last two events detected by the monitoring circuit having a same identifier are identical, the method carries on at step 32.

At step 32, monitoring circuit 18 increases the repetition counter associated with the event detected at step 30. No message is then transmitted to analysis tool 24.

If, at step 31, the last two detected events corresponding to a same identifier are not identical, the method carries on to step 33.

At step 33, monitoring circuit 18 checks whether the content of the repetition counter associated with the event detected at step 30 is equal to 0. If so, the method carries on to step 34.

At step 34, monitoring circuit 18 transmits to analysis tool 24 via test terminals 22 a message representative of the event detected at step 30. In the case where the detected event is a jump, the message may consist in the concatenation of the memorized characteristic data and comprise a header identifying the nature of the jump, the number of instructions performed since the preceding jump detection, the address of the jump destination instruction if available, etc.

If, at step 33, the content of the repetition counter associated with the event detected at step 30 is different from 0, the method carries on to step 35.

At step 35, monitoring circuit 18 transmits to analysis tool 24 via test terminals 22 a repetition message that may be formed, for example, of a header indicating that it is a repetition message and of the content of the repetition counter associated with the event detected at step 30. The repetition counter is then set back to 0 and the method carries on to step 34 at which monitoring circuit 18 provides analysis tool 24 with a message representative of the event detected at step 30.

The present invention enables reducing the number of digital messages transmitted by monitoring circuit 18 to analysis tool 24 when several events which would cause the transmission by the monitoring circuit of identical messages are successively detected by monitoring circuit 18. For example, the present invention thus enables, in the case of loops of small size where the frequency of jumps may become significant, maintaining the transmission frequency of digital messages on test terminals 22 under the maximum authorized transmission frequency.

According to a variation of the present invention, when at step 33, the repetition counter associated with a specific event reaches a threshold value, monitoring circuit 18 transmits a message especially comprising the threshold value of the repetition counter, followed by a message representative of the specific event, and resets the loop repetition counter to 0. This enables avoiding, for example in the case where a loop is repeated a significant number of times, that no message is transmitted to analysis tool 24 for too long a time period.

Of course, the present invention is likely to have various alterations, modifications, and improvements which will readily occur to those skilled in the art. For example, a repetition message may be used for certain specific events only, a message being specifically provided to the analysis tool by the monitoring circuit for the other events. 

1. A method for transmitting digital messages through output terminals of a monitoring circuit integrated to a microprocessor on execution of an instruction sequence by the microprocessor, each digital message being representative of characteristic data stored by the monitoring circuit on detection of a specific event from among several specific events in the execution of the instruction sequence, one of said data corresponding to an identifier of said specific event, comprising: comparing the characteristic stored data of the last two detected specific events corresponding to a same identifier; if the compared data are identical, incrementing a repetition counter associated with said specific event; and if the compared data are different, transmitting a digital message representative of the data characteristic of the last detected specific event and, further, if the content of the repetition counter associated with said specific event is different from zero, transmitting a digital message indicating a repetition of the specific event.
 2. The method of claim 1, in which the digital message indicating a repetition of the specific event comprises the content of the repetition counter associated with said specific event.
 3. The method of claim 1, further comprising resetting the repetition counter associated with said specific event after transmission of a digital message indicating a repetition of the specific event.
 4. The method of claim 1, in which the characteristic data comprise the number of instructions executed by the microprocessor between the last two detected specific events.
 5. The method of claim 1, in which the specific event is a jump in the instruction sequence executed by the microprocessor.
 6. The method of claim 5, in which the characteristic stored data comprise data representative of the address of the destination instruction of the last detected jump.
 7. The method of claim 1, in which the specific event is a read or write instruction in the instruction sequence executed by the microprocessor.
 8. The method of claim 1, further comprising the steps of: transmitting a digital message indicating a repetition of the specific event if the content of the repetition counter associated with said specific event is greater than a determined threshold; and setting the repetition counter associated with said specific event to zero.
 9. A device for transmitting digital messages between a monitoring circuit integrated with a microprocessor and an analysis tool, on execution of an instruction sequence by the microprocessor, comprising: means for detecting a specific event from among several specific events in the execution of the instruction sequence; means for storing data characteristic of the detected specific event, one of said characteristic data corresponding to an identifier of the specific event; and means for transmitting a digital message representative of the stored characteristic data, means for comparing characteristic data of the last two detected specific events corresponding to a same identifier; means for incrementing a repetition counter associated with said specific event when the comparison means provides a signal indicating that the compared data are identical, and in that the transmission means is capable of transmitting a message representative of the data characteristic of the last detected specific event when the comparison means provides a signal indicating that the compared data are different and, further, of transmitting a digital message indicating a repetition of the specific event when the incrementation means provides a signal indicating that the content of the repetition counter associated with said specific event is different from zero.
 10. The device of claim 9, in which the incrementation means is further capable of setting the repetition counter associated with said specific event to zero when the transmission means transmits a digital message indicating a repetition of the specific event. 